<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
        name="viewport">
  <meta content="ie=edge" http-equiv="X-UA-Compatible">
  <title>私人定制手串</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    .box {
      width: 100%;
      max-width: 750px;
      margin: 0 auto;
      overflow: hidden;
      position: relative;
    }

    .img {
      width: 100%;
      height: calc(100vh - 2.2rem);
      font-size: 0;
      overflow-y: scroll;
      border: none;
    }

    .img::-webkit-scrollbar {
      display: none;
    }

    img {
      width: 100%;
      border: none;
      overflow: hidden;
      vertical-align: bottom;
      margin-bottom: -1px;
    }

    .foot {
      background-color: #FFFFFF;
      width: 100%;
      height: 2.2rem;
      padding-top: 20px;
      position: fixed;
      bottom: 0;
      max-width: 750px;
    }

    .btn {
      width: 100%;
    }
  </style>
</head>
<body>
<div class="box" style="">
  <div class="img" style="width: 100%">
    {foreach $images as $img}
    <img src="{$oss}{$img}" alt="">
    {/foreach}
  </div>
  <div class="foot">
    <img class="btn" src="{$oss}/active/web/images/page2024009/6.png" />
  </div>
</div>
</body>
<script src="{$oss}active/seven/js/jquery-v2.1.1.min.js"></script>
<script src="{$oss}/active/newyear/js/rem.js"></script>
<script>
    let appType = `{$app_type}`

    /**
     * 调用客户端本地跳转
     * @param target
     * @param link
     */
    function commonJsToNative(target, link) {
        if (!target) return;
        console.log('commonJsToNative', 'target:', target, 'link:', link, 'app-type:', appType);
        switch (appType) {
            case 'ios':
                window.webkit.messageHandlers.commonJsToNative.postMessage({
                    'target': target,
                    'link': link,
                });
                break;
            case 'android':
                androidwebview.commonJsToNative(target, link)
                break;
            default:
                window.location.href = `{$link.h5}`;
        }
    }

    $(document).on("click", ".btn", function () {
        commonJsToNative('local', `{$link.app}`);
    })
</script>
</html>
